﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class PoolTest
{
    static void Main()
    {
        Pool resources = new Pool();
        Resource res1 = resources.GetResource();
        Resource res2 = resources.GetResource();
        Resource res3 = resources.GetResource();
        using (res2)
        {
            Console.WriteLine(res2.Value);
        }
        Resource res4 = resources.GetResource();
        Console.WriteLine(res4.Value);
    }
}
